<div class="position-relative mb-3">
    <div class="profile-header-cover">
        <img src="/img/1.jpg" alt="">
    </div>
    <div class=" px-3 d-flex justify-content-between">
        <div class="profile-header-avatar">
            <img class="avatar rounded-circle" src="/img/avatar.jpg" alt="">
            <!-- <a href="javascript:;" class="upload-avatar d-flex flex-column justify-content-center align-items-center text-white" title="上传新头像">
                <label for="avatarInput">
                    <input type="file" class="d-none" id="avatarInput" name="avatarInput" accept="image/png, image/jpeg, img/jpg">
                    <i aria-hidden="true" class="iconfont icon-upload fs-28"></i>
                    <p class="fs-15">上传新头像</p>
                </label>
            </a> -->
        </div>
        <div class="d-flex mt-3">
            <div class="me-auto">
            <?php if(session('user_id') && session('user_id') === $user->id): ?>
                <!-- <button type="button" class="btn btn-outline" data-bs-toggle="modal" data-bs-target="#editProfile">编辑个人资料</button> -->
                <a class="btn btn-outline" href="/user/edit/<?= session('user_id') ?>">编辑个人资料</a>
            <?php else: ?>
                <a class="btn btn-outline" href="#">关注</a>
            <?php endif ?>
            </div>
        </div>
    </div>
    <div class="py-3 px-4">
        <p class="fs-18 fw-bold text-truncate">
            <?= $user->username ?>
        </p>
        <span class="text-muted fs-14"><?= nice_time($user->created_at) ?>加入</span>
    </div>
</div>
<!-- <div class="px-4 py-2">
    <p class="fs-20 fw-bold"><?= $user->username ?></p>
    <span class="text-muted fs-14"><?= nice_time($user->created_at) ?>加入</span>
</div> -->
<nav class="nav nav-justified border-bottom">
  <a class="nav-link" id="my-info" href="/user/edit/<?= $user->id ?>">个人信息</a>
  <a class="nav-link" id="my-reset" href="/user/reset/<?= $user->id ?>">修改密码</a>
  <a class="nav-link" id="my-avatar" href="/user/avatar/<?= $user->id ?>">设置头像</a>
</nav>
